<!DOCTYPE html>
<html>

<head>
    <style>
    .images img {
        display: none;
    }
    
    .images li {
        list-style: none;
    }
    </style>
</head>

<body>
    <ul class="images">
        <li><img src="https://farm8.staticflickr.com/7431/10271435233_9282c44fee_o.jpg" /></li>
        <li><img src="https://farm9.staticflickr.com/8125/8988262620_74720ece52_o.jpg" /></li>
        <li><img src="https://farm8.staticflickr.com/7391/8842312290_894195f470_o.jpg" /></li>
        <li><img src="https://farm9.staticflickr.com/8253/8811828736_30009e1ae5_o.jpg" /></li>
        <li><img src="https://farm9.staticflickr.com/8334/8400794773_b887a0c725_o.jpg" /></li>
        <li><img src="https://farm9.staticflickr.com/8080/8346200014_36fbca06c0_o.jpg" /></li>
        <li><img src="https://farm9.staticflickr.com/8070/8157236803_4dfd96fcd6_o.jpg" /></li>
        <li><img src="https://farm9.staticflickr.com/8336/8131259781_6f9c47a4b1_o.jpg" /></li>
        <li><img src="https://farm9.staticflickr.com/8332/8083451788_3afb5073c6_o.jpg" /></li>
        <li><img src="https://farm9.staticflickr.com/8179/7948632554_986e8c08f4_o.jpg" /></li>
        <li><img src="https://farm9.staticflickr.com/8174/7893834940_d496041f7f_o.jpg" /></li>
        <li><img src="https://farm8.staticflickr.com/7131/7822678460_2edac5ea3f_o.jpg" /></li>
    </ul>
    <div class="results"></div>

    <!-- bower:js -->
    <script src="../../node_modules/jquery/dist/jquery.js"></script>
    <script src="../../node_modules/jquery-colorbox/jquery.colorbox.js"></script>
    <script src="../../node_modules/swipebox/src/js/jquery.swipebox.min.js"></script>
    <script src="../../dist/js/jquery.justifiedGallery.js"></script>
    <!-- endbower -->
    <script>
    $(document).ready(function() {
        $('ul.images img').each(function(_, el) {
            var img = $(el);
            img.on('load', function(el) {
                var $el = $(el.target);
                console.log('img: w ' + $el.width() + ' h ' + $el.height() + ' src ' + $el.attr('src'));
            });
        });
    });
    </script>
</body>

</html>
